package com.example.bigwork.mapper;

import com.example.bigwork.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Optional;

@Mapper
public interface UserMapper {
    int insertUser(User user);
    Optional<User> findByUsername(@Param("username") String username);
    Optional<User> findById(@Param("id") Long id);
    Optional<User> findByEmail(@Param("email") String email);

    int updateUser(User user);
}
